const longpress = {
    name: 'longpress',
    // 长按指令
    mounted(el, binding) {
        let timer = null;
        el.addEventListener('mousedown', () => {
            timer = setTimeout(() => {
                binding.value();
            }, 1000);
        });
        el.addEventListener('mouseup', () => {
            clearTimeout(timer);
        });
    },
}

export default longpress